package com.changgou.goods.dao;

import com.changgou.goods.pojo.Category;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.PathVariable;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface CategoryMapper extends Mapper<Category> {

    @Select("SELECT s.name NAME,s.options OPTIONS,s.seq seq,s.template_id template_id FROM tb_category c,tb_spec s WHERE c.`template_id` = s.template_id AND c.`name`= #{name}")
    List<Map> findSpecByCategoryName(@Param("name") String name);

}
